#pragma once
// MESSAGE XAP_SBG_IMU_DATA_MSG PACKING

#define MAVLINK_MSG_ID_XAP_SBG_IMU_DATA_MSG 20803


typedef struct __mavlink_xap_sbg_imu_data_msg_t {
 uint32_t time_boot_ms; /*< [ms] Timestamp (milliseconds since system boot)*/
 float accel_x; /*<   Filtered Accelerometer - X axis, m/s2 */
 float accel_y; /*<   Filtered Accelerometer - Y axis, m/s2 */
 float accel_z; /*<   Filtered Accelerometer - Z axis, m/s2 */
 float gyro_x; /*<   Filtered Gyroscope - X axis, rad/s */
 float gyro_y; /*<   Filtered Gyroscope - Y axis, rad/s */
 float gyro_z; /*<   Filtered Gyroscope - Z axis, rad/s */
 float temp; /*<   Internal Temperature, oC */
 float delta_vel_x; /*<   Sculling output - X axis, m/s2 */
 float delta_vel_y; /*<   Sculling output - Y axis, m/s2 */
 float delta_vel_z; /*<   Sculling output - Z axis, m/s2 */
 float delta_angle_x; /*<   Coning output - X axis, rad/s */
 float delta_angle_y; /*<   Coning output - Y axis, rad/s */
 float delta_angle_z; /*<   Coning output - Z axis, rad/s */
 uint16_t imu_status; /*<   Sbg imu status */
 int8_t sbg_id; /*<   Sbg device id */
} mavlink_xap_sbg_imu_data_msg_t;

#define MAVLINK_MSG_ID_XAP_SBG_IMU_DATA_MSG_LEN 59
#define MAVLINK_MSG_ID_XAP_SBG_IMU_DATA_MSG_MIN_LEN 59
#define MAVLINK_MSG_ID_20803_LEN 59
#define MAVLINK_MSG_ID_20803_MIN_LEN 59

#define MAVLINK_MSG_ID_XAP_SBG_IMU_DATA_MSG_CRC 125
#define MAVLINK_MSG_ID_20803_CRC 125



#if MAVLINK_COMMAND_24BIT
#define MAVLINK_MESSAGE_INFO_XAP_SBG_IMU_DATA_MSG { \
    20803, \
    "XAP_SBG_IMU_DATA_MSG", \
    16, \
    {  { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_xap_sbg_imu_data_msg_t, time_boot_ms) }, \
         { "sbg_id", NULL, MAVLINK_TYPE_INT8_T, 0, 58, offsetof(mavlink_xap_sbg_imu_data_msg_t, sbg_id) }, \
         { "imu_status", NULL, MAVLINK_TYPE_UINT16_T, 0, 56, offsetof(mavlink_xap_sbg_imu_data_msg_t, imu_status) }, \
         { "accel_x", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_xap_sbg_imu_data_msg_t, accel_x) }, \
         { "accel_y", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_xap_sbg_imu_data_msg_t, accel_y) }, \
         { "accel_z", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_xap_sbg_imu_data_msg_t, accel_z) }, \
         { "gyro_x", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_xap_sbg_imu_data_msg_t, gyro_x) }, \
         { "gyro_y", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_xap_sbg_imu_data_msg_t, gyro_y) }, \
         { "gyro_z", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_xap_sbg_imu_data_msg_t, gyro_z) }, \
         { "temp", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_xap_sbg_imu_data_msg_t, temp) }, \
         { "delta_vel_x", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_xap_sbg_imu_data_msg_t, delta_vel_x) }, \
         { "delta_vel_y", NULL, MAVLINK_TYPE_FLOAT, 0, 36, offsetof(mavlink_xap_sbg_imu_data_msg_t, delta_vel_y) }, \
         { "delta_vel_z", NULL, MAVLINK_TYPE_FLOAT, 0, 40, offsetof(mavlink_xap_sbg_imu_data_msg_t, delta_vel_z) }, \
         { "delta_angle_x", NULL, MAVLINK_TYPE_FLOAT, 0, 44, offsetof(mavlink_xap_sbg_imu_data_msg_t, delta_angle_x) }, \
         { "delta_angle_y", NULL, MAVLINK_TYPE_FLOAT, 0, 48, offsetof(mavlink_xap_sbg_imu_data_msg_t, delta_angle_y) }, \
         { "delta_angle_z", NULL, MAVLINK_TYPE_FLOAT, 0, 52, offsetof(mavlink_xap_sbg_imu_data_msg_t, delta_angle_z) }, \
         } \
}
#else
#define MAVLINK_MESSAGE_INFO_XAP_SBG_IMU_DATA_MSG { \
    "XAP_SBG_IMU_DATA_MSG", \
    16, \
    {  { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_xap_sbg_imu_data_msg_t, time_boot_ms) }, \
         { "sbg_id", NULL, MAVLINK_TYPE_INT8_T, 0, 58, offsetof(mavlink_xap_sbg_imu_data_msg_t, sbg_id) }, \
         { "imu_status", NULL, MAVLINK_TYPE_UINT16_T, 0, 56, offsetof(mavlink_xap_sbg_imu_data_msg_t, imu_status) }, \
         { "accel_x", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_xap_sbg_imu_data_msg_t, accel_x) }, \
         { "accel_y", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_xap_sbg_imu_data_msg_t, accel_y) }, \
         { "accel_z", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_xap_sbg_imu_data_msg_t, accel_z) }, \
         { "gyro_x", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_xap_sbg_imu_data_msg_t, gyro_x) }, \
         { "gyro_y", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_xap_sbg_imu_data_msg_t, gyro_y) }, \
         { "gyro_z", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_xap_sbg_imu_data_msg_t, gyro_z) }, \
         { "temp", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_xap_sbg_imu_data_msg_t, temp) }, \
         { "delta_vel_x", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_xap_sbg_imu_data_msg_t, delta_vel_x) }, \
         { "delta_vel_y", NULL, MAVLINK_TYPE_FLOAT, 0, 36, offsetof(mavlink_xap_sbg_imu_data_msg_t, delta_vel_y) }, \
         { "delta_vel_z", NULL, MAVLINK_TYPE_FLOAT, 0, 40, offsetof(mavlink_xap_sbg_imu_data_msg_t, delta_vel_z) }, \
         { "delta_angle_x", NULL, MAVLINK_TYPE_FLOAT, 0, 44, offsetof(mavlink_xap_sbg_imu_data_msg_t, delta_angle_x) }, \
         { "delta_angle_y", NULL, MAVLINK_TYPE_FLOAT, 0, 48, offsetof(mavlink_xap_sbg_imu_data_msg_t, delta_angle_y) }, \
         { "delta_angle_z", NULL, MAVLINK_TYPE_FLOAT, 0, 52, offsetof(mavlink_xap_sbg_imu_data_msg_t, delta_angle_z) }, \
         } \
}
#endif

/**
 * @brief Pack a xap_sbg_imu_data_msg message
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param msg The MAVLink message to compress the data into
 *
 * @param time_boot_ms [ms] Timestamp (milliseconds since system boot)
 * @param sbg_id   Sbg device id 
 * @param imu_status   Sbg imu status 
 * @param accel_x   Filtered Accelerometer - X axis, m/s2 
 * @param accel_y   Filtered Accelerometer - Y axis, m/s2 
 * @param accel_z   Filtered Accelerometer - Z axis, m/s2 
 * @param gyro_x   Filtered Gyroscope - X axis, rad/s 
 * @param gyro_y   Filtered Gyroscope - Y axis, rad/s 
 * @param gyro_z   Filtered Gyroscope - Z axis, rad/s 
 * @param temp   Internal Temperature, oC 
 * @param delta_vel_x   Sculling output - X axis, m/s2 
 * @param delta_vel_y   Sculling output - Y axis, m/s2 
 * @param delta_vel_z   Sculling output - Z axis, m/s2 
 * @param delta_angle_x   Coning output - X axis, rad/s 
 * @param delta_angle_y   Coning output - Y axis, rad/s 
 * @param delta_angle_z   Coning output - Z axis, rad/s 
 * @return length of the message in bytes (excluding serial stream start sign)
 */
static inline uint16_t mavlink_msg_xap_sbg_imu_data_msg_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
                               uint32_t time_boot_ms, int8_t sbg_id, uint16_t imu_status, float accel_x, float accel_y, float accel_z, float gyro_x, float gyro_y, float gyro_z, float temp, float delta_vel_x, float delta_vel_y, float delta_vel_z, float delta_angle_x, float delta_angle_y, float delta_angle_z)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char buf[MAVLINK_MSG_ID_XAP_SBG_IMU_DATA_MSG_LEN];
    _mav_put_uint32_t(buf, 0, time_boot_ms);
    _mav_put_float(buf, 4, accel_x);
    _mav_put_float(buf, 8, accel_y);
    _mav_put_float(buf, 12, accel_z);
    _mav_put_float(buf, 16, gyro_x);
    _mav_put_float(buf, 20, gyro_y);
    _mav_put_float(buf, 24, gyro_z);
    _mav_put_float(buf, 28, temp);
    _mav_put_float(buf, 32, delta_vel_x);
    _mav_put_float(buf, 36, delta_vel_y);
    _mav_put_float(buf, 40, delta_vel_z);
    _mav_put_float(buf, 44, delta_angle_x);
    _mav_put_float(buf, 48, delta_angle_y);
    _mav_put_float(buf, 52, delta_angle_z);
    _mav_put_uint16_t(buf, 56, imu_status);
    _mav_put_int8_t(buf, 58, sbg_id);

        memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_XAP_SBG_IMU_DATA_MSG_LEN);
#else
    mavlink_xap_sbg_imu_data_msg_t packet;
    packet.time_boot_ms = time_boot_ms;
    packet.accel_x = accel_x;
    packet.accel_y = accel_y;
    packet.accel_z = accel_z;
    packet.gyro_x = gyro_x;
    packet.gyro_y = gyro_y;
    packet.gyro_z = gyro_z;
    packet.temp = temp;
    packet.delta_vel_x = delta_vel_x;
    packet.delta_vel_y = delta_vel_y;
    packet.delta_vel_z = delta_vel_z;
    packet.delta_angle_x = delta_angle_x;
    packet.delta_angle_y = delta_angle_y;
    packet.delta_angle_z = delta_angle_z;
    packet.imu_status = imu_status;
    packet.sbg_id = sbg_id;

        memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_XAP_SBG_IMU_DATA_MSG_LEN);
#endif

    msg->msgid = MAVLINK_MSG_ID_XAP_SBG_IMU_DATA_MSG;
    return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_XAP_SBG_IMU_DATA_MSG_MIN_LEN, MAVLINK_MSG_ID_XAP_SBG_IMU_DATA_MSG_LEN, MAVLINK_MSG_ID_XAP_SBG_IMU_DATA_MSG_CRC);
}

/**
 * @brief Pack a xap_sbg_imu_data_msg message on a channel
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param chan The MAVLink channel this message will be sent over
 * @param msg The MAVLink message to compress the data into
 * @param time_boot_ms [ms] Timestamp (milliseconds since system boot)
 * @param sbg_id   Sbg device id 
 * @param imu_status   Sbg imu status 
 * @param accel_x   Filtered Accelerometer - X axis, m/s2 
 * @param accel_y   Filtered Accelerometer - Y axis, m/s2 
 * @param accel_z   Filtered Accelerometer - Z axis, m/s2 
 * @param gyro_x   Filtered Gyroscope - X axis, rad/s 
 * @param gyro_y   Filtered Gyroscope - Y axis, rad/s 
 * @param gyro_z   Filtered Gyroscope - Z axis, rad/s 
 * @param temp   Internal Temperature, oC 
 * @param delta_vel_x   Sculling output - X axis, m/s2 
 * @param delta_vel_y   Sculling output - Y axis, m/s2 
 * @param delta_vel_z   Sculling output - Z axis, m/s2 
 * @param delta_angle_x   Coning output - X axis, rad/s 
 * @param delta_angle_y   Coning output - Y axis, rad/s 
 * @param delta_angle_z   Coning output - Z axis, rad/s 
 * @return length of the message in bytes (excluding serial stream start sign)
 */
static inline uint16_t mavlink_msg_xap_sbg_imu_data_msg_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
                               mavlink_message_t* msg,
                                   uint32_t time_boot_ms,int8_t sbg_id,uint16_t imu_status,float accel_x,float accel_y,float accel_z,float gyro_x,float gyro_y,float gyro_z,float temp,float delta_vel_x,float delta_vel_y,float delta_vel_z,float delta_angle_x,float delta_angle_y,float delta_angle_z)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char buf[MAVLINK_MSG_ID_XAP_SBG_IMU_DATA_MSG_LEN];
    _mav_put_uint32_t(buf, 0, time_boot_ms);
    _mav_put_float(buf, 4, accel_x);
    _mav_put_float(buf, 8, accel_y);
    _mav_put_float(buf, 12, accel_z);
    _mav_put_float(buf, 16, gyro_x);
    _mav_put_float(buf, 20, gyro_y);
    _mav_put_float(buf, 24, gyro_z);
    _mav_put_float(buf, 28, temp);
    _mav_put_float(buf, 32, delta_vel_x);
    _mav_put_float(buf, 36, delta_vel_y);
    _mav_put_float(buf, 40, delta_vel_z);
    _mav_put_float(buf, 44, delta_angle_x);
    _mav_put_float(buf, 48, delta_angle_y);
    _mav_put_float(buf, 52, delta_angle_z);
    _mav_put_uint16_t(buf, 56, imu_status);
    _mav_put_int8_t(buf, 58, sbg_id);

        memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_XAP_SBG_IMU_DATA_MSG_LEN);
#else
    mavlink_xap_sbg_imu_data_msg_t packet;
    packet.time_boot_ms = time_boot_ms;
    packet.accel_x = accel_x;
    packet.accel_y = accel_y;
    packet.accel_z = accel_z;
    packet.gyro_x = gyro_x;
    packet.gyro_y = gyro_y;
    packet.gyro_z = gyro_z;
    packet.temp = temp;
    packet.delta_vel_x = delta_vel_x;
    packet.delta_vel_y = delta_vel_y;
    packet.delta_vel_z = delta_vel_z;
    packet.delta_angle_x = delta_angle_x;
    packet.delta_angle_y = delta_angle_y;
    packet.delta_angle_z = delta_angle_z;
    packet.imu_status = imu_status;
    packet.sbg_id = sbg_id;

        memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_XAP_SBG_IMU_DATA_MSG_LEN);
#endif

    msg->msgid = MAVLINK_MSG_ID_XAP_SBG_IMU_DATA_MSG;
    return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_XAP_SBG_IMU_DATA_MSG_MIN_LEN, MAVLINK_MSG_ID_XAP_SBG_IMU_DATA_MSG_LEN, MAVLINK_MSG_ID_XAP_SBG_IMU_DATA_MSG_CRC);
}

/**
 * @brief Encode a xap_sbg_imu_data_msg struct
 *
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param msg The MAVLink message to compress the data into
 * @param xap_sbg_imu_data_msg C-struct to read the message contents from
 */
static inline uint16_t mavlink_msg_xap_sbg_imu_data_msg_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_xap_sbg_imu_data_msg_t* xap_sbg_imu_data_msg)
{
    return mavlink_msg_xap_sbg_imu_data_msg_pack(system_id, component_id, msg, xap_sbg_imu_data_msg->time_boot_ms, xap_sbg_imu_data_msg->sbg_id, xap_sbg_imu_data_msg->imu_status, xap_sbg_imu_data_msg->accel_x, xap_sbg_imu_data_msg->accel_y, xap_sbg_imu_data_msg->accel_z, xap_sbg_imu_data_msg->gyro_x, xap_sbg_imu_data_msg->gyro_y, xap_sbg_imu_data_msg->gyro_z, xap_sbg_imu_data_msg->temp, xap_sbg_imu_data_msg->delta_vel_x, xap_sbg_imu_data_msg->delta_vel_y, xap_sbg_imu_data_msg->delta_vel_z, xap_sbg_imu_data_msg->delta_angle_x, xap_sbg_imu_data_msg->delta_angle_y, xap_sbg_imu_data_msg->delta_angle_z);
}

/**
 * @brief Encode a xap_sbg_imu_data_msg struct on a channel
 *
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param chan The MAVLink channel this message will be sent over
 * @param msg The MAVLink message to compress the data into
 * @param xap_sbg_imu_data_msg C-struct to read the message contents from
 */
static inline uint16_t mavlink_msg_xap_sbg_imu_data_msg_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_xap_sbg_imu_data_msg_t* xap_sbg_imu_data_msg)
{
    return mavlink_msg_xap_sbg_imu_data_msg_pack_chan(system_id, component_id, chan, msg, xap_sbg_imu_data_msg->time_boot_ms, xap_sbg_imu_data_msg->sbg_id, xap_sbg_imu_data_msg->imu_status, xap_sbg_imu_data_msg->accel_x, xap_sbg_imu_data_msg->accel_y, xap_sbg_imu_data_msg->accel_z, xap_sbg_imu_data_msg->gyro_x, xap_sbg_imu_data_msg->gyro_y, xap_sbg_imu_data_msg->gyro_z, xap_sbg_imu_data_msg->temp, xap_sbg_imu_data_msg->delta_vel_x, xap_sbg_imu_data_msg->delta_vel_y, xap_sbg_imu_data_msg->delta_vel_z, xap_sbg_imu_data_msg->delta_angle_x, xap_sbg_imu_data_msg->delta_angle_y, xap_sbg_imu_data_msg->delta_angle_z);
}

/**
 * @brief Send a xap_sbg_imu_data_msg message
 * @param chan MAVLink channel to send the message
 *
 * @param time_boot_ms [ms] Timestamp (milliseconds since system boot)
 * @param sbg_id   Sbg device id 
 * @param imu_status   Sbg imu status 
 * @param accel_x   Filtered Accelerometer - X axis, m/s2 
 * @param accel_y   Filtered Accelerometer - Y axis, m/s2 
 * @param accel_z   Filtered Accelerometer - Z axis, m/s2 
 * @param gyro_x   Filtered Gyroscope - X axis, rad/s 
 * @param gyro_y   Filtered Gyroscope - Y axis, rad/s 
 * @param gyro_z   Filtered Gyroscope - Z axis, rad/s 
 * @param temp   Internal Temperature, oC 
 * @param delta_vel_x   Sculling output - X axis, m/s2 
 * @param delta_vel_y   Sculling output - Y axis, m/s2 
 * @param delta_vel_z   Sculling output - Z axis, m/s2 
 * @param delta_angle_x   Coning output - X axis, rad/s 
 * @param delta_angle_y   Coning output - Y axis, rad/s 
 * @param delta_angle_z   Coning output - Z axis, rad/s 
 */
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS

static inline void mavlink_msg_xap_sbg_imu_data_msg_send(mavlink_channel_t chan, uint32_t time_boot_ms, int8_t sbg_id, uint16_t imu_status, float accel_x, float accel_y, float accel_z, float gyro_x, float gyro_y, float gyro_z, float temp, float delta_vel_x, float delta_vel_y, float delta_vel_z, float delta_angle_x, float delta_angle_y, float delta_angle_z)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char buf[MAVLINK_MSG_ID_XAP_SBG_IMU_DATA_MSG_LEN];
    _mav_put_uint32_t(buf, 0, time_boot_ms);
    _mav_put_float(buf, 4, accel_x);
    _mav_put_float(buf, 8, accel_y);
    _mav_put_float(buf, 12, accel_z);
    _mav_put_float(buf, 16, gyro_x);
    _mav_put_float(buf, 20, gyro_y);
    _mav_put_float(buf, 24, gyro_z);
    _mav_put_float(buf, 28, temp);
    _mav_put_float(buf, 32, delta_vel_x);
    _mav_put_float(buf, 36, delta_vel_y);
    _mav_put_float(buf, 40, delta_vel_z);
    _mav_put_float(buf, 44, delta_angle_x);
    _mav_put_float(buf, 48, delta_angle_y);
    _mav_put_float(buf, 52, delta_angle_z);
    _mav_put_uint16_t(buf, 56, imu_status);
    _mav_put_int8_t(buf, 58, sbg_id);

    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_XAP_SBG_IMU_DATA_MSG, buf, MAVLINK_MSG_ID_XAP_SBG_IMU_DATA_MSG_MIN_LEN, MAVLINK_MSG_ID_XAP_SBG_IMU_DATA_MSG_LEN, MAVLINK_MSG_ID_XAP_SBG_IMU_DATA_MSG_CRC);
#else
    mavlink_xap_sbg_imu_data_msg_t packet;
    packet.time_boot_ms = time_boot_ms;
    packet.accel_x = accel_x;
    packet.accel_y = accel_y;
    packet.accel_z = accel_z;
    packet.gyro_x = gyro_x;
    packet.gyro_y = gyro_y;
    packet.gyro_z = gyro_z;
    packet.temp = temp;
    packet.delta_vel_x = delta_vel_x;
    packet.delta_vel_y = delta_vel_y;
    packet.delta_vel_z = delta_vel_z;
    packet.delta_angle_x = delta_angle_x;
    packet.delta_angle_y = delta_angle_y;
    packet.delta_angle_z = delta_angle_z;
    packet.imu_status = imu_status;
    packet.sbg_id = sbg_id;

    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_XAP_SBG_IMU_DATA_MSG, (const char *)&packet, MAVLINK_MSG_ID_XAP_SBG_IMU_DATA_MSG_MIN_LEN, MAVLINK_MSG_ID_XAP_SBG_IMU_DATA_MSG_LEN, MAVLINK_MSG_ID_XAP_SBG_IMU_DATA_MSG_CRC);
#endif
}

/**
 * @brief Send a xap_sbg_imu_data_msg message
 * @param chan MAVLink channel to send the message
 * @param struct The MAVLink struct to serialize
 */
static inline void mavlink_msg_xap_sbg_imu_data_msg_send_struct(mavlink_channel_t chan, const mavlink_xap_sbg_imu_data_msg_t* xap_sbg_imu_data_msg)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    mavlink_msg_xap_sbg_imu_data_msg_send(chan, xap_sbg_imu_data_msg->time_boot_ms, xap_sbg_imu_data_msg->sbg_id, xap_sbg_imu_data_msg->imu_status, xap_sbg_imu_data_msg->accel_x, xap_sbg_imu_data_msg->accel_y, xap_sbg_imu_data_msg->accel_z, xap_sbg_imu_data_msg->gyro_x, xap_sbg_imu_data_msg->gyro_y, xap_sbg_imu_data_msg->gyro_z, xap_sbg_imu_data_msg->temp, xap_sbg_imu_data_msg->delta_vel_x, xap_sbg_imu_data_msg->delta_vel_y, xap_sbg_imu_data_msg->delta_vel_z, xap_sbg_imu_data_msg->delta_angle_x, xap_sbg_imu_data_msg->delta_angle_y, xap_sbg_imu_data_msg->delta_angle_z);
#else
    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_XAP_SBG_IMU_DATA_MSG, (const char *)xap_sbg_imu_data_msg, MAVLINK_MSG_ID_XAP_SBG_IMU_DATA_MSG_MIN_LEN, MAVLINK_MSG_ID_XAP_SBG_IMU_DATA_MSG_LEN, MAVLINK_MSG_ID_XAP_SBG_IMU_DATA_MSG_CRC);
#endif
}

#if MAVLINK_MSG_ID_XAP_SBG_IMU_DATA_MSG_LEN <= MAVLINK_MAX_PAYLOAD_LEN
/*
  This varient of _send() can be used to save stack space by re-using
  memory from the receive buffer.  The caller provides a
  mavlink_message_t which is the size of a full mavlink message. This
  is usually the receive buffer for the channel, and allows a reply to an
  incoming message with minimum stack space usage.
 */
static inline void mavlink_msg_xap_sbg_imu_data_msg_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan,  uint32_t time_boot_ms, int8_t sbg_id, uint16_t imu_status, float accel_x, float accel_y, float accel_z, float gyro_x, float gyro_y, float gyro_z, float temp, float delta_vel_x, float delta_vel_y, float delta_vel_z, float delta_angle_x, float delta_angle_y, float delta_angle_z)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char *buf = (char *)msgbuf;
    _mav_put_uint32_t(buf, 0, time_boot_ms);
    _mav_put_float(buf, 4, accel_x);
    _mav_put_float(buf, 8, accel_y);
    _mav_put_float(buf, 12, accel_z);
    _mav_put_float(buf, 16, gyro_x);
    _mav_put_float(buf, 20, gyro_y);
    _mav_put_float(buf, 24, gyro_z);
    _mav_put_float(buf, 28, temp);
    _mav_put_float(buf, 32, delta_vel_x);
    _mav_put_float(buf, 36, delta_vel_y);
    _mav_put_float(buf, 40, delta_vel_z);
    _mav_put_float(buf, 44, delta_angle_x);
    _mav_put_float(buf, 48, delta_angle_y);
    _mav_put_float(buf, 52, delta_angle_z);
    _mav_put_uint16_t(buf, 56, imu_status);
    _mav_put_int8_t(buf, 58, sbg_id);

    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_XAP_SBG_IMU_DATA_MSG, buf, MAVLINK_MSG_ID_XAP_SBG_IMU_DATA_MSG_MIN_LEN, MAVLINK_MSG_ID_XAP_SBG_IMU_DATA_MSG_LEN, MAVLINK_MSG_ID_XAP_SBG_IMU_DATA_MSG_CRC);
#else
    mavlink_xap_sbg_imu_data_msg_t *packet = (mavlink_xap_sbg_imu_data_msg_t *)msgbuf;
    packet->time_boot_ms = time_boot_ms;
    packet->accel_x = accel_x;
    packet->accel_y = accel_y;
    packet->accel_z = accel_z;
    packet->gyro_x = gyro_x;
    packet->gyro_y = gyro_y;
    packet->gyro_z = gyro_z;
    packet->temp = temp;
    packet->delta_vel_x = delta_vel_x;
    packet->delta_vel_y = delta_vel_y;
    packet->delta_vel_z = delta_vel_z;
    packet->delta_angle_x = delta_angle_x;
    packet->delta_angle_y = delta_angle_y;
    packet->delta_angle_z = delta_angle_z;
    packet->imu_status = imu_status;
    packet->sbg_id = sbg_id;

    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_XAP_SBG_IMU_DATA_MSG, (const char *)packet, MAVLINK_MSG_ID_XAP_SBG_IMU_DATA_MSG_MIN_LEN, MAVLINK_MSG_ID_XAP_SBG_IMU_DATA_MSG_LEN, MAVLINK_MSG_ID_XAP_SBG_IMU_DATA_MSG_CRC);
#endif
}
#endif

#endif

// MESSAGE XAP_SBG_IMU_DATA_MSG UNPACKING


/**
 * @brief Get field time_boot_ms from xap_sbg_imu_data_msg message
 *
 * @return [ms] Timestamp (milliseconds since system boot)
 */
static inline uint32_t mavlink_msg_xap_sbg_imu_data_msg_get_time_boot_ms(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint32_t(msg,  0);
}

/**
 * @brief Get field sbg_id from xap_sbg_imu_data_msg message
 *
 * @return   Sbg device id 
 */
static inline int8_t mavlink_msg_xap_sbg_imu_data_msg_get_sbg_id(const mavlink_message_t* msg)
{
    return _MAV_RETURN_int8_t(msg,  58);
}

/**
 * @brief Get field imu_status from xap_sbg_imu_data_msg message
 *
 * @return   Sbg imu status 
 */
static inline uint16_t mavlink_msg_xap_sbg_imu_data_msg_get_imu_status(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint16_t(msg,  56);
}

/**
 * @brief Get field accel_x from xap_sbg_imu_data_msg message
 *
 * @return   Filtered Accelerometer - X axis, m/s2 
 */
static inline float mavlink_msg_xap_sbg_imu_data_msg_get_accel_x(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  4);
}

/**
 * @brief Get field accel_y from xap_sbg_imu_data_msg message
 *
 * @return   Filtered Accelerometer - Y axis, m/s2 
 */
static inline float mavlink_msg_xap_sbg_imu_data_msg_get_accel_y(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  8);
}

/**
 * @brief Get field accel_z from xap_sbg_imu_data_msg message
 *
 * @return   Filtered Accelerometer - Z axis, m/s2 
 */
static inline float mavlink_msg_xap_sbg_imu_data_msg_get_accel_z(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  12);
}

/**
 * @brief Get field gyro_x from xap_sbg_imu_data_msg message
 *
 * @return   Filtered Gyroscope - X axis, rad/s 
 */
static inline float mavlink_msg_xap_sbg_imu_data_msg_get_gyro_x(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  16);
}

/**
 * @brief Get field gyro_y from xap_sbg_imu_data_msg message
 *
 * @return   Filtered Gyroscope - Y axis, rad/s 
 */
static inline float mavlink_msg_xap_sbg_imu_data_msg_get_gyro_y(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  20);
}

/**
 * @brief Get field gyro_z from xap_sbg_imu_data_msg message
 *
 * @return   Filtered Gyroscope - Z axis, rad/s 
 */
static inline float mavlink_msg_xap_sbg_imu_data_msg_get_gyro_z(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  24);
}

/**
 * @brief Get field temp from xap_sbg_imu_data_msg message
 *
 * @return   Internal Temperature, oC 
 */
static inline float mavlink_msg_xap_sbg_imu_data_msg_get_temp(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  28);
}

/**
 * @brief Get field delta_vel_x from xap_sbg_imu_data_msg message
 *
 * @return   Sculling output - X axis, m/s2 
 */
static inline float mavlink_msg_xap_sbg_imu_data_msg_get_delta_vel_x(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  32);
}

/**
 * @brief Get field delta_vel_y from xap_sbg_imu_data_msg message
 *
 * @return   Sculling output - Y axis, m/s2 
 */
static inline float mavlink_msg_xap_sbg_imu_data_msg_get_delta_vel_y(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  36);
}

/**
 * @brief Get field delta_vel_z from xap_sbg_imu_data_msg message
 *
 * @return   Sculling output - Z axis, m/s2 
 */
static inline float mavlink_msg_xap_sbg_imu_data_msg_get_delta_vel_z(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  40);
}

/**
 * @brief Get field delta_angle_x from xap_sbg_imu_data_msg message
 *
 * @return   Coning output - X axis, rad/s 
 */
static inline float mavlink_msg_xap_sbg_imu_data_msg_get_delta_angle_x(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  44);
}

/**
 * @brief Get field delta_angle_y from xap_sbg_imu_data_msg message
 *
 * @return   Coning output - Y axis, rad/s 
 */
static inline float mavlink_msg_xap_sbg_imu_data_msg_get_delta_angle_y(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  48);
}

/**
 * @brief Get field delta_angle_z from xap_sbg_imu_data_msg message
 *
 * @return   Coning output - Z axis, rad/s 
 */
static inline float mavlink_msg_xap_sbg_imu_data_msg_get_delta_angle_z(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  52);
}

/**
 * @brief Decode a xap_sbg_imu_data_msg message into a struct
 *
 * @param msg The message to decode
 * @param xap_sbg_imu_data_msg C-struct to decode the message contents into
 */
static inline void mavlink_msg_xap_sbg_imu_data_msg_decode(const mavlink_message_t* msg, mavlink_xap_sbg_imu_data_msg_t* xap_sbg_imu_data_msg)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    xap_sbg_imu_data_msg->time_boot_ms = mavlink_msg_xap_sbg_imu_data_msg_get_time_boot_ms(msg);
    xap_sbg_imu_data_msg->accel_x = mavlink_msg_xap_sbg_imu_data_msg_get_accel_x(msg);
    xap_sbg_imu_data_msg->accel_y = mavlink_msg_xap_sbg_imu_data_msg_get_accel_y(msg);
    xap_sbg_imu_data_msg->accel_z = mavlink_msg_xap_sbg_imu_data_msg_get_accel_z(msg);
    xap_sbg_imu_data_msg->gyro_x = mavlink_msg_xap_sbg_imu_data_msg_get_gyro_x(msg);
    xap_sbg_imu_data_msg->gyro_y = mavlink_msg_xap_sbg_imu_data_msg_get_gyro_y(msg);
    xap_sbg_imu_data_msg->gyro_z = mavlink_msg_xap_sbg_imu_data_msg_get_gyro_z(msg);
    xap_sbg_imu_data_msg->temp = mavlink_msg_xap_sbg_imu_data_msg_get_temp(msg);
    xap_sbg_imu_data_msg->delta_vel_x = mavlink_msg_xap_sbg_imu_data_msg_get_delta_vel_x(msg);
    xap_sbg_imu_data_msg->delta_vel_y = mavlink_msg_xap_sbg_imu_data_msg_get_delta_vel_y(msg);
    xap_sbg_imu_data_msg->delta_vel_z = mavlink_msg_xap_sbg_imu_data_msg_get_delta_vel_z(msg);
    xap_sbg_imu_data_msg->delta_angle_x = mavlink_msg_xap_sbg_imu_data_msg_get_delta_angle_x(msg);
    xap_sbg_imu_data_msg->delta_angle_y = mavlink_msg_xap_sbg_imu_data_msg_get_delta_angle_y(msg);
    xap_sbg_imu_data_msg->delta_angle_z = mavlink_msg_xap_sbg_imu_data_msg_get_delta_angle_z(msg);
    xap_sbg_imu_data_msg->imu_status = mavlink_msg_xap_sbg_imu_data_msg_get_imu_status(msg);
    xap_sbg_imu_data_msg->sbg_id = mavlink_msg_xap_sbg_imu_data_msg_get_sbg_id(msg);
#else
        uint8_t len = msg->len < MAVLINK_MSG_ID_XAP_SBG_IMU_DATA_MSG_LEN? msg->len : MAVLINK_MSG_ID_XAP_SBG_IMU_DATA_MSG_LEN;
        memset(xap_sbg_imu_data_msg, 0, MAVLINK_MSG_ID_XAP_SBG_IMU_DATA_MSG_LEN);
    memcpy(xap_sbg_imu_data_msg, _MAV_PAYLOAD(msg), len);
#endif
}
